import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          katex: ['katex'],
          hljs: ['highlight.js']
        }
      }
    }
  },
  optimizeDeps: {
    include: [
      'markdown-it',
      '@traptitech/markdown-it-katex',
      'dompurify'
    ]
  },
  server: {
    host: '0.0.0.0', // 允许所有网络接口
    port: 5173      // 确认端口号
  }
})
